/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package cn.edu.just.firstjavaapp.l22;

import java.awt.BorderLayout;
import javax.swing.JFrame;
import javax.swing.JLabel;

/**
 *
 * @author vcc
 */
public class Painter {
    public static void main(String[] args){
        // create JFrame
        JFrame application = new JFrame( "A simple paint program" );
        //application.setLayout(null);
        PaintPanel paintPanel = new PaintPanel(); // create paint panel
        application.add( paintPanel, BorderLayout.CENTER ); // in center
        application.add( new JLabel( "Drag the mouse to draw" ),BorderLayout.SOUTH);
        
        application.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
        application.setSize( 400, 200 ); // set frame size
        application.setVisible(true);
    }
}
